CC = gcc
COMPILE_FLAG = -O0 -Wall

SRC_DIRECTORY := src
BUILD_DIRECTORY := obj
INCLUDES := -I include 

LIBS = 

all: signal_catch signal_nocatch signal_sigchld signal_kill signal_alarm

signal_catch:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/signal_catch $(SRC_DIRECTORY)/signal_catch.c  $(LIBS)

signal_nocatch:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/signal_nocatch $(SRC_DIRECTORY)/signal_nocatch.c  $(LIBS)

signal_sigchld:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/signal_sigchld $(SRC_DIRECTORY)/signal_sigchld.c  $(LIBS)

signal_kill:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/signal_kill $(SRC_DIRECTORY)/signal_kill.c  $(LIBS)

signal_alarm:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/signal_alarm $(SRC_DIRECTORY)/signal_alarm.c  $(LIBS) 
	
clean:
	rm -rf $(BUILD_DIRECTORY)/*